Simulating non-volatile memory in virtual distributed switches

ABSTRACT

A virtual non-volatile memory is simulated for a virtual switch. Operating instructions from the non-volatile memory of a physical switch may be translated into a flash type file. The flash type file may be stored on a virtual storage area in the virtual switch. Operating instructions in the virtual switch may access the flash type file in the virtual storage area without the need to access the non-volatile memory in the physical switch.

BACKGROUND

The present invention relates to network virtualization, and morespecifically, to simulating a non-volatile memory in virtual distributedswitches.

In a physical switch, accessing memory for running software operationstypically involves access to a physical memory module such as randomaccess memory (RAM) or a flash memory. Physical switch software mayinteract with physical flash memory on the switch hardware. This devicemaybe used to store a compressed file system such as JFFS2 or it maywrite directly to an offset value on the device.

When porting network operating systems from physical switches tovirtualization environments, it may be difficult to access memory forrunning software since when in a virtual distributed switching platform,the virtual distributed switch does not have physical flash memoryhardware or physical NVRAM available. The flash memory, particularlywhen referenced by offset and structured, is typically hardware specificand software may be written for a particular family of physicalswitches. A considerable amount of software modification istraditionally required to change the existing network operating systemin order to accommodate the non-standard platform. Since networkoperating systems are typically designed to write data directly to flashvia a memory technology device interface, it may be a major drawback tohave to modify each element of the code that normally reads/writes toflash to read/write to configuration files instead. This can makeutilizing the switch software very difficult in a virtualized solutionsuch as a virtual distributed switch. The virtual distributed switchingplatform cannot readily share code with physical switches, which canlead to a fragmented code base supporting multiple platforms andincreased cost.

SUMMARY

According to one embodiment of the present invention, a network switchcomprises a non-volatile memory module; a virtual memory storagearchitecture; a data storage module including a translation driver; anda processor configured to: operate the translation driver to duplicate aflash type file stored in the non-volatile memory, and store theduplicated flash type file in the virtual memory storage architecture.

According to another embodiment of the present invention, a process ofsimulating non-volatile memory in a virtual switch comprises accessing aphysical non-volatile memory module for operating instructions; creatinga flash type file of the operating instructions on a physical datastorage module; translating the flash type file for use in a virtualswitch; storing the translated flash type file to a virtual memory area;and accessing, by the virtual switch, the translated flash type file inthe virtual memory area for use as operating instructions in the virtualswitch.

According to still yet another embodiment of the present invention, acomputer program product for simulating a non-volatile memory in avirtual switch, the computer program product comprising a computerreadable storage medium having computer readable program code embodiedtherewith, the computer readable program code being configured to:access a physical non-volatile memory module on a physical switch foroperating instructions; operate a Linux translation driver to interfacewith the physical non-volatile memory module; translate, using the Linuxtranslation driver, a set of operating instructions from the physicalnon-volatile memory module into a flash type file of the operatinginstructions; store the translated flash type file to a virtual memoryarea; and access, with the virtual switch, the translated flash typefile in the virtual memory area for use as operating instructions in thevirtual switch.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a block diagram of a physical switch including a virtualswitch environment in accordance with an exemplary embodiment of thepresent invention;

FIG. 2 is a block diagram of software architecture for translatingphysical switch software into a virtual switch storage area inaccordance with another exemplary embodiment of the present invention;and

FIG. 3 is a flow chart of a process of simulating a non-volatile memoryin a virtual switch environment in accordance with yet another exemplaryembodiment of the present invention.

DETAILED DESCRIPTION

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Referring now to FIG. 1, a physical switch 10 is shown according to anexemplary embodiment of the present invention. The physical switch 10may be configured to house all or a portion of a virtual switchenvironment. The physical switch 10 may include a processor 20, a memorymodule 30, and a data storage module 40. The memory module 30 may be anon-volatile memory, for example non-volatile random access memory(NVRAM) or flash memory. The data storage module 40 may include softwaredata that may include instructions for operating a virtual switch 50.The virtual switch 50 may access the processor 20, the memory module 30,and the data storage 40 to establish the virtual switch environment. Avirtual data storage area 60 may be part of the virtual switchenvironment configured to provide stored data to the virtual switch 50on demand.

In an exemplary embodiment, the virtual switch 50 may be part of adistributed fabric of virtual switches. For sake of illustration, only asingle virtual switch 50 is shown. However, in some embodiments, aplurality of virtual switches 50 may operate within the physical switch10. In some embodiments, the virtual switch 50 may be connected tovirtual switches 50 residing remotely from the physical switch 10.

Referring now to FIGS. 1 and 2, software architecture 100 fortranslating software for the physical switch 10 into the virtual datastorage area 60 is shown according to another exemplary embodiment ofthe present invention. The architecture 100 may be configured totranslate physical switch operating instructions 110 to the virtual datastorage area 60. The non-volatile memory module 20 may interfaceoperating instructions 110 resident on the physical switch 10. Atranslation driver layer 150 operated by the processor 20 may manage theinteraction between a simulated non-volatile memory and the physicalswitch software 110. In an exemplary embodiment, the simulatednon-volatile memory may be resident on the physical switch 10. In anexemplary embodiment, Linux ® coding may be used for operatinginstructions. Flash type memory containing the operating instructions110 may be interfaced using a memory technology device (MTD) 120. Highlevel wrapper functions may interface with a Linux MTD device 120 usingfor example, read() write(), open() and close()type functionality. Thesefunctions may be intercepted by the translation driver layer 150. Thetranslation driver layer 150 may determine if a raw flash type file isavailable on the virtual data storage area 60. It will be understoodthat a “raw” flash type file may be one where the contents of the flashare stored directly as data instead of being in some standard structuredformat such as, for example, a JFFS2 file system. The translation driverlayer 150 may employ a device translator 130 to determine if the mappingfor the MTD device 120 to block device (raw flash file) is setupcorrectly. For example, the translation driver layer 150 may determineif the raw flash file matches the block size and sector size associatedwith the non-volatile memory module 30. If a “JFFS2” or another filesystem is used on non-volatile memory module 30, the translation driverlayer 150 may handle the creation and management of the file system overthe MTD device translator 130. The translator 130 may take requests thatare designed for MTD memory devices, mapping those block/sectorlocations to a block/sector location on the physical storage device sothat an operation may be performed on the block device (virtual datastorage area 60).

Referring now to FIG. 3, a process 300 of simulating a non-volatilememory in a virtual switch environment is shown. The processor 20 mayaccess 310 the physical non-volatile memory module 30 on the physicalswitch 10 for operating instructions 110. A raw flash type file may becreated based on the operating instructions 110 accessed. The flash typefile may be stored in the data storage area 40. The flash type file mayhave a block size and storage size associated with the non-volatilememory in the memory module 30. The processor 20 may operate 320 theLinux translation driver 150 to interface with the physical non-volatilememory module 30. MTD function calls may be sent by the physical switch10 to the translation driver 150. The translation layer 150 may route330 the function calls to the MTD device translator 130. The MTD devicetranslator 130 may translate 340 the raw flash type file set ofoperating instructions into a flash type file readable within thevirtual switch 50. The processor 20 may store 350 the translated flashtype file to the virtual memory area 60 as a virtual flash file. Thevirtual switch 50 may access the translated flash type file in thevirtual memory area 60 for use as operating instructions in the virtualswitch 50.

It may be appreciated that no code changes may be needed because theblock size and physical storage size of the virtual flash files areidentical to the original physical flash device. As such, hard-codedoffsets and memory locations on the virtual flash are the same as theywould be on the physical flash. In addition, since translation layer 150accepts MTD calls, no upstream functions need to be modified.Translation may perform read/write in MTD raw format, which may bestored directly to a virtual disk. The software running in the virtualenvironment may behave as it would on a physical device because itaccesses the virtual flash file as a simulated non-volatile memory.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, may be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A network switch, comprising: a non-volatile memory module; a virtualmemory storage architecture; a data storage module including atranslation driver; and a processor configured to: operate thetranslation driver to duplicate a flash type file stored in thenon-volatile memory, and store the duplicated flash type file in thevirtual memory storage architecture.
 2. The network switch of claim 1,wherein the non-volatile memory module is a non-volatile random accessmemory (NVRAM).
 3. The network switch of claim 1, wherein thenon-volatile memory module is a flash memory.
 4. The network switch ofclaim 1, wherein the processor is configured to operate the translationdriver to determine if the flash type file includes a block size and asector size corresponding to the non-volatile memory module.
 5. Thenetwork switch of claim 1, wherein the virtual memory storagearchitecture is configured to read/write to the flash type file in thevirtual memory storage architecture. 6-11. (canceled)
 12. A computerprogram product for simulating non-volatile memory in a virtual switch,the computer program product comprising a computer readable storagemedium having computer readable program code embodied therewith, thecomputer readable program code being configured to: access a physicalnon-volatile memory module on a physical switch for operatinginstructions; operate a Linux translation driver to interface with thephysical non-volatile memory module; translate, using the Linuxtranslation driver, a set of operating instructions from the physicalnon-volatile memory module into a flash type file of the operatinginstructions; store the translated flash type file to a virtual memoryarea; and access, with the virtual switch, the translated flash typefile in the virtual memory area for use as operating instructions in thevirtual switch.
 13. The computer program product of claim 12, thecomputer readable program code being configured to read or write to thetranslated flash type file in the virtual memory area.
 14. The computerprogram product of claim 12, the computer readable program code beingconfigured to determine whether the translated flash type file includesa block size and a sector size corresponding to the physical non-volatile memory module, wherein the determination is made prior tostoring the translated flash type file to the virtual memory area.